05. Installing Python (Windows)

Using Python on Windows

These are the instructions for downloading and installing Python on a Windows machine. If you have a Mac (running OS X), follow the instructions for Mac computers.

Downloading and Installing Python 2

Windows computers don't come with Python installed, so you'll need to download and install it on your machine.

Downloading Python 2

You can download the latest version of Python 2 — version 2.7.13 — from Python’s website.

PLEASE NOTE: We are NOT using Python 3 in this Nanodegree program. There are significant differences between Python 2 and 3, and we will be using Python 2.

Downloading Python 2.7.13 from Python's website.

Downloading Python 2.7.13 from Python's website.

Installing Python 2

Once the download is complete, locate the installation file on your computer. It will probably be in your Downloads folder with the name python-2.7.13. Run it either by double-clicking on it or by right-clicking and selecting Install. Then, follow the steps below to complete the installation process.

The Python installer in your Downloads folder.

The Python installer in your Downloads folder.

Step #1: Specify User Access

The first part of the installation setup asks you to specify which users will have access to Python 2.7.13. Select Install for all users, and click Next.

Specifying user access.

Specifying user access.

Step #2: Select Destination Directory

Next, you need to select the destination directory (or folder) for Python’s installation. You should use the default destination of C:\Python27\, and click Next.

Selecting destination directory.

Selecting destination directory.

Step #3: Customize Python 2.7.13

Note: This step is CRITICAL. Please read and follow the instructions very carefully.

When you come to the installation window that reads Customize Python 2.7.13 at the top, you’ll need to ensure that **TWO ** features are selected for installation:

  • First, make sure that the feature labeled pip is selected. You can verify this selection by confirming the presence of a grey drive icon to the left of the pip label, as shown below. (If you instead see a red “X” next to pip, you’ll need to click on the feature. This will bring up a menu of options, and you should select Will be installed on local hard drive. Selecting this option should change the icon from a red “X” to a grey drive icon.)

Customizing Python 2.7.13 — selecting features.

Customizing Python 2.7.13 — selecting features.

  • Second, make sure that the feature labeled Add python.exe to Path is selected. You may have to scroll through the listed features to see this item. Note again that if you see a red “X” instead of a grey drive icon, you’ll need to click on the feature label (Add python.exe to Path) and select Will be installed on local hard drive from the menu of options.

Selecting a feature by clicking on it — the icon will change from a red “X” (when unselected) to a grey drive icon (when selected).

Selecting a feature by clicking on it — the icon will change from a red “X” (when unselected) to a grey drive icon (when selected).

Once BOTH features — pip and Add python.exe to Path — have been selected for installation, click Next to move on to the actual installation step.

Verifying that both features are selected (by noting the grey drive icons to the left of their labels).

Verifying that both features are selected (by noting the grey drive icons to the left of their labels).

Step #4: Install Python 2.7.13

Give the computer a moment to install Python 2.7.13. During this process, you'll see the window shown below.

Installing Python.

Installing Python.

Step #5: Completing the Installation

When the installation is complete, click Finish to close the installer.

Installation is complete.

Installation is complete.

Step #6: Verifying Installation

To confirm that your installation was successful, you should open up a program called IDLE (Python GUI). When it opens, it should display Python’s version (2.7.13), as shown below.

Opening up a program called IDLE (Python GUI) will allow us to verify our installed version of Python — 2.7.13.

Opening up a program called IDLE (Python GUI) will allow us to verify our installed version of Python — 2.7.13.